package com.youdoneed.news.news.vo;

import java.util.List;

import com.youdoneed.news.news.entity.CmfNav;

import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

/**
 * Created by dev on 2017/7/7.
 */
public class CmfNavVo   implements Serializable{

    @ApiModelProperty("栏目id")
    private Integer id;

    @ApiModelProperty("栏目标题")
    private String label;

    @ApiModelProperty("栏目图标")
    private String icon;

    @ApiModelProperty("排序")
    private Integer listorder;
    
    @ApiModelProperty("子导航")
    private List<CmfNavVo> subNavs;

    public List<CmfNavVo> getSubNavs() {
		return subNavs;
	}

	public void setSubNavs(List<CmfNavVo> subNavs) {
		this.subNavs = subNavs;
	}

	public Integer getId() {
        return id;
    }

    public String getLabel() {
        return label;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getListorder() {
        return listorder;
    }

    public void setListorder(Integer listorder) {
        this.listorder = listorder;
    }

    @Override
    public boolean equals(Object obj) {

        if(!(obj instanceof CmfNavVo)){
            return false;
        }
        CmfNavVo nav = (CmfNavVo)obj;
        if(Objects.equals(this.getId(), nav.getId())){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return id.hashCode();
    }
}
